<?php
/**
 * @package ShopperPress Theme
 * @subpackage Header
 */
 
if(function_exists('get_option')){
	
	/********************** SHOPPERPRESS SINGLE PAGE REDIRECT **********************/
	/*******************************************************************************/
	
	if(is_single()){
	
		$redirect = get_post_meta($post->ID, "redirect", true);
		if($redirect ==1){
			$link = get_post_meta($post->ID, "buy_link", true);
			
			header("location: ".$link);
			exit();
		}
	
	}
			
	/********************** SHOPPERPRESS LAYOUT GLOBALS  **********************/
	/************************************************************************/
	 
	$GLOBALS['SP_LAY_LEFT'] 		= "grid_2";
	$GLOBALS['SP_LAY_RIGHT'] 		= "grid_2";
	$GLOBALS['SP_LAY_CONTENT'] 		= "grid_8";
	$GLOBALS['SP_LAY_CONTENT_LIST'] = "";
	
	/********************** SHOPPERPRESS GENERAL SETTINGS  **********************/
	/************************************************************************/
	$theme_spacing = array('Basic-Blue','Basic-Green','Basic-Purple','Basic-Red',''); 
	$GLOBALS['shopperpress']['system'] 				= get_option("shopperpress_system");
	$GLOBALS['shopperpress']['subnav'] 				= get_option("display_subnav");
	$GLOBALS['shopperpress']['pages'] 				= get_option("display_showpages");
	$GLOBALS['shopperpress']['search_box'] 			= get_option("display_search");		
	$GLOBALS['shopperpress']['theme'] 				= get_option('shopperpress_theme');
	$GLOBALS['shopperpress']['language'] 			= get_option("shopperpress_language");
	$GLOBALS['shopperpress']['price_tag'] 			= get_option("display_pricetag");
	$GLOBALS['shopperpress']['display_cart'] 		= get_option("display_cart");
	$GLOBALS['shopperpress']['analytics_tracking'] 	= get_option("analytics_tracking");
	$GLOBALS['shopperpress']['logo_url'] 			= get_option('logo_url');
	$GLOBALS['shopperpress']['currency_code'] 		= get_option('currency_code');
	$GLOBALS['shopperpress']['excluded_pages'] 		= get_option("excluded_pages");
	$GLOBALS['shopperpress']['excluded_articles'] 	= get_option("article_cats");
	$GLOBALS['shopperpress']['account'] 			= get_option("display_account");
	$GLOBALS['shopperpress']['categories'] 			= get_option("display_categories");
	$GLOBALS['shopperpress']['categories_leftmenu'] = get_option("display_categories_leftmenu"); 
	$GLOBALS['shopperpress']['orders_url'] 			= get_option("orders_url");
	$GLOBALS['shopperpress']['sitemap_url'] 		= get_option("sitemap_url");
	$GLOBALS['shopperpress']['tc_url'] 				= get_option("tc_url");
	$GLOBALS['shopperpress']['parivacy_url'] 		= get_option("parivacy_url");
	$GLOBALS['shopperpress']['display_flymenu']		= get_option("display_flymenu");
	/********************** SHOPPERPRESS DESIGN CHANGER **********************/
	/************************************************************************/
	/*
	if ( !isset($_SESSION['dd'] ) && !isset($_REQUEST['dd']) ){
	$GLOBALS['shopperpress']['theme'] 			= get_option('shopperpress_theme');
	}elseif(isset($_REQUEST['dd'])){	
	$GLOBALS['shopperpress']['theme'] 			= $_REQUEST['dd'];
	$_SESSION['dd']= $_REQUEST['dd'];
	}elseif(isset($_SESSION['dd'])){
	$GLOBALS['shopperpress']['theme'] 			= $_SESSION['dd'];
	}
	}*/
		
	/********************** SHOPPERPRESS ADVERTISING EXTRA **********************/
	/************************************************************************/
			
	$GLOBALS['adminads'] = 0;
			
	/********************** SHOPPERPRESS CURRENCY **********************/
	/************************************************************************/

		
		if(get_option("display_subnav_currency") =="yes"){

		if ( !isset($_SESSION['c'] ) && !isset($_REQUEST['c']) ){
		
			$_SESSION['currency_symbol'] = $GLOBALS['shopperpress']['currency_code']; // DEFAULT CURRENCY

			$data = GetCurrencyExchange($_SESSION['currency_symbol']); // get the default values
 
			$_SESSION['currency_caption'] 	= $data['caption'];
			$_SESSION['currency_code'] 		= $data['code'];			 
			$_SESSION['currency_value'] 	= $data['value'];
			$_SESSION['currency_symbol'] 	= $data['symbol'];
			$_SESSION['c'] = 1;
 
		}elseif(isset($_REQUEST['c'])){	
 
			$data = GetCurrencyExchange($_REQUEST['c']);
	
			if($data['code'] !=""){
	
			unset($_SESSION['currency']);
			unset($_SESSION['currency_symbol']);

			$_SESSION['currency_symbol'] 	= $data['symbol'];
			$_SESSION['currency_caption'] 	= $data['caption'];
			$_SESSION['currency_code'] 		= $data['code'];			 
			$_SESSION['currency_value'] 	= $data['value'];	

			$_SESSION['c'] = 1;
			
			}

		}

}else{

	$_SESSION['currency_symbol'] 	= get_option("currency_symbol"); // DEFAULT CURRENCY
	$_SESSION['currency_code'] 		= get_option("currency_code");
}

/********************** SHOPPERPRESS LANGUAGE SELECTION **********************/
/*****************************************************************************/

if($GLOBALS['shopperpress']['language'] ==""){ 

	define("SHOPPERPRESS_LANG","english");
	
}else{

	define("SHOPPERPRESS_LANG",$GLOBALS['shopperpress']['language']);
}	

 
	if(get_option("display_subnav_flags") =="yes"){

		if ( !isset($_SESSION['lang'] ) && !isset($_REQUEST['l']) ){
		
			// SAVE SESSON FOR LANG
			define('D_LANG',SHOPPERPRESS_LANG);
			$_SESSION['lang'] = SHOPPERPRESS_LANG;		
 
		}else{		
 
				if (isset($_REQUEST['l'])){ 
					unset($_SESSION['lang']);
				}
				if (isset($_SESSION['lang']) && !isset($_REQUEST['l'])){
						$_REQUEST['l'] = $_SESSION['lang'];
						define('D_LANG',$_REQUEST['l']); 
				}
				elseif (isset($_SESSION['lang'] ) && isset($_REQUEST['l'])){
						unset($_SESSION['lang']);
						$_SESSION['lang'] = $_REQUEST['l']; 
						define('D_LANG',$_REQUEST['l']); 
				}
				else{			 
					 
					if (file_exists(SHOPPRESS_PATH . 'langs/'.strip_tags($_REQUEST['l']).'.php')) {
						$_SESSION['lang'] = $_REQUEST['l'];
						define('D_LANG',$_REQUEST['l']);
					} else {
					   define('D_LANG',SHOPPERPRESS_LANG);
					}				
			}		
	}
	}else{

		define('D_LANG',SHOPPERPRESS_LANG);

	}
	 
	require_once (SHOPPRESS_PATH . 'langs/'.D_LANG.'.php');
	$GLOBALS['_LANG'] = $LANG_;

		
	}

/********************** SHOPPERPRESS FILE DOWNLOAD  **********************/
/************************************************************************/

	if(isset($_POST) && isset($_POST['hash']) ){
	
		check_admin_referer('ShopperPressDownload');
		
		if(isset($_POST['fileID'])){
			$FILE_ID = $_POST['fileID'];
			$Finished=1;
		}else{
			$FILE_ID = $post->ID;
			$Finished=0;
		}
		 
		getDownloadData($FILE_ID,$Finished);
	
	}
	
	
/********************** SHOPPERPRESS LOAD PAGE CONFIG **********************/
/***************************************************************************/

 
// CHECK DEFAULT PRICING
$_SESSION['ddc']['price'] = updatePrice();
 
if(file_exists(FilterPath()."/wp-content/themes/shopperpress/themes/".$GLOBALS['shopperpress']['theme'].'/header.php')){

	include(FilterPath()."/wp-content/themes/shopperpress/themes/".$GLOBALS['shopperpress']['theme'].'/header.php');

}else{
 
//print_r($_SESSION);

global $current_user; get_currentuserinfo(); 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>> 
<head>
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    <link rel="shortcut icon" href="<?php echo get_option("faviconLink"); ?>" type="image/x-icon" />
    <title><?php wp_title('&laquo;', true, 'right'); ?> <?php bloginfo('name'); ?></title>
    <?php wp_head(); ?>
</head> 
<link rel="stylesheet" href="./css/slide.css" type="text/css" media="screen" />
<!-- Sliding effect -->
<script src="./js/slide.js" type="text/javascript"></script>

<body>
<!-- Login panel Begins -->
<div id="toppanel">
	<div id="panel">
		<div class="content clearfix">
			<div class="left">
				<h1>Welcome to FocusMagnet.com </h1>
				<h2>Your one stop web-store for all fragrances & gift-sets</h2>		
				<p class="grey">You can put anything you want in this sliding panel: videos, audio, images, forms... The only limit is your imagination!</p>
				<h2>Download</h2>
				<p class="grey">To download this script go back to <a href="http://web-kreation.com/index.php/tutorials/nice-clean-sliding-login-panel-built-with-jquery" title="Download">article &raquo;</a></p>
			</div>
			<div class="left">
				<!-- Login Form -->
				<form class="clearfix" action="#" method="post">
					<h1>Member Login</h1>
					<label class="grey" for="log">Username:</label>
					<input class="field" type="text" name="log" id="log" value="" size="23" />
					<label class="grey" for="pwd">Password:</label>
					<input class="field" type="password" name="pwd" id="pwd" size="23" />
	            	<label><input name="rememberme" id="rememberme" type="checkbox" checked="checked" value="forever" /> &nbsp;Remember me</label>
        			<div class="clear"></div>
					<input type="submit" name="submit" value="Login" class="bt_login" />
					<a class="lost-pwd" href="#">Lost your password?</a>
				</form>
			</div>
			<div class="left right">			
				<!-- Register Form -->
				<form action="#" method="post">
					<h1>Not a member yet? Sign Up!</h1>				
					<label class="grey" for="signup">Username:</label>
					<input class="field" type="text" name="signup" id="signup" value="" size="23" />
					<label class="grey" for="email">Email:</label>
					<input class="field" type="text" name="email" id="email" size="23" />
					<label>A password will be e-mailed to you.</label>
					<input type="submit" name="submit" value="Register" class="bt_register" />
				</form>
			</div>
		</div>
</div> <!-- /login -->	

	<!-- The tab on top -->	
	<div class="tab">
		<ul class="login">
			<li class="left">&nbsp;</li>
			<li>Hello Guest!</li>
			<li class="sep">|</li>
			<li id="toggle">
				<a id="open" class="open" href="#">Log In | Register</a>
				<a id="close" style="display: none;" class="close" href="#">Close Panel</a>			
			</li>
			<li class="right">&nbsp;</li>
		</ul> 
	</div> <!-- / top -->
	
</div> 
<!-- Login panel -->

<div id="ShopperPress_Wrapper">

<div class="container_12" id="ShopperPress_Header">

   <?php if($GLOBALS['shopperpress']['pages'] =="no"){ ?>
   
   	<div id="TopMenu">
	
		<?php wp_list_pages("title_li=&exclude=".$GLOBALS['shopperpress']['excluded_pages'] ); ?>
    
    </div>
	
	<?php } ?>
 
	<div class="grid_7" id="Logo">

		<a href="<?php bloginfo('url'); ?>/">
        
		<?php if(strlen($GLOBALS['shopperpress']['logo_url']) < 2){ ?>
		
		 <img src="<?php echo bloginfo('template_url')."/themes/".$GLOBALS['shopperpress']['theme'].'/images/logo.png'; ?>" alt="logo" />

		<?php 
		}else{ 
		
			if(substr($GLOBALS['shopperpress']['logo_url'],0,4) =="http"){
			echo "<img src='".$GLOBALS['shopperpress']['logo_url']."'alt='logo' />";
			}else{
			echo "<div id='LogoText'>".$GLOBALS['shopperpress']['logo_url']."</div>";
			}
		 } 
		
		?>
		</a>

	</div>
	<div style="margin-top:10px; margin-bottom:10px; float:right;margin-right:10px;">
	
	<table border="0" align="right" cellpadding="0" cellspacing="0">
		<tr>			
			<td colspan="2" style="color: #940494; font-size: 12px; vertical-align: middle;">&nbsp;
				<a href="#" rel="nofollow" style="text-decoration:underline;">Help</a>&nbsp;|
				<a href="#" rel="nofollow" style="text-decoration:underline;">Order status</a>&nbsp;&nbsp;|
				<a href="#" rel="nofollow" style="text-decoration:underline;">My account</a>&nbsp;&nbsp;|
				<a href="#" rel="nofollow" style="text-decoration:underline; font-weight:bold;">Shopping Basket</a>
			</td>
		</tr>
		<tr height="10px">			
			<td colspan="2">
			</td>
		</tr>
		<tr>			
			<td colspan="2" style="color: #940494; font-size: 12px;">
				
			<?php global $user_ID; if ( $user_ID ) : ?>
			
			<?php global $current_user; get_currentuserinfo();  ?>
			
			&nbsp;<?php echo SPEC($GLOBALS['_LANG']['_welcome']) ?> <strong><?php echo $current_user->user_login; ?></strong></a>

			<a href="<?php echo wp_logout_url(); ?>"><?php echo SPEC($GLOBALS['_LANG']['_logout']) ?></a>
			   
		   	<?php else : ?> 
		   
			&nbsp;<strong><?php echo SPEC($GLOBALS['_LANG']['_welcomevisitor']) ?></strong>  
	             	<a href="<?php bloginfo('url'); ?>/wp-login.php?action=register">
				 <?php echo SPEC($GLOBALS['_LANG']['_register']); ?>
	             	</a> 
	             
	             	or 
	             
	             	<a href="<?php bloginfo('url'); ?>/wp-login.php">
				 <?php echo SPEC($GLOBALS['_LANG']['_login']); ?>
	             	</a> &nbsp;

			<?php endif; ?>
			<?php //wp_list_pages("title_li=&exclude=".$GLOBALS['shopperpress']['excluded_pages'] );
			//if($GLOBALS['shopperpress']['pages'] =="sub"){ wp_list_pages("title_li=&exclude=".$GLOBALS['shopperpress']['excluded_pages'] ); }?>

			</td>
		</tr>
		<tr height="10px">			
			<td colspan="2">
			</td>
		</tr>
		<tr >			
			<td colspan="2" style="color: #940494; font-size: 12px;">
				&nbsp;1.800.F-MAGNeT &nbsp;| &nbsp; 1.402.PERFUME
			</td>
		</tr>
		
		<tr align="left">
		<?php if(get_option("display_subnav_currency") =="yes"){ ?>

			<td style="align: left;">

			<dl id="ShopperPressCurrency" class="dropdown">

			<?php if(isset($_SESSION['currency_caption']) && $_SESSION['currency_caption'] !=""){ ?>
			<dt><a href="#"><span><?php echo $_SESSION['currency_caption']; ?> <img src="<?php echo bloginfo('template_url').'/images/langs/arrow.png'; ?>" border=1 align="right" style="margin-right:4px;"/></span></a></dt>

			<?php }else{ ?>
			<dt><a href="#"><span><?php echo get_option("currency_caption"); ?> <img src="<?php echo bloginfo('template_url').'/images/langs/arrow.png'; ?>" border=1 align="right" style="margin-right:4px;"/></span></a></dt>

			<?php } ?>
			<dd>
				<ul style="z-index: 1;">
					<?php echo MakeCurrencyDisplay(); ?>
		 
				</ul>

			</dd>
			</dl>
			</td>


		<?php } if(get_option("display_subnav_flags") =="yess"){ ?>
		
		 <td style="align: left;">
			
			<dl id="ShopperFlags" class="dropdown1">
	 
				<?php if($_SESSION['lang']=="french"){ ?><dt><span><a href="#" title="french"><img class="flag" src="<?php echo bloginfo('template_url').'/images/langs/'; ?>fr.png" alt="french" /> French <img src="<?php echo bloginfo('template_url').'/images/langs/arrow.png'; ?>" border=0 align="right" style="margin-left:10px;"/> </span></a></dt>
				<?php }elseif($_SESSION['lang']=="bulgarian"){ ?><dt><a href="#" title="bulgarian"><span><img class="flag" src="<?php echo bloginfo('template_url').'/images/langs/'; ?>bg.png" alt="bulgarian" /> Bulgarian <img src="<?php echo bloginfo('template_url').'/images/langs/arrow.png'; ?>" border=0 align="right" style="margin-left:10px;"/> </span></a></dt>
				<?php }elseif($_SESSION['lang']=="german"){ ?><dt><a href="#" title="german"><span><img class="flag" src="<?php echo bloginfo('template_url').'/images/langs/'; ?>de.png" alt="german" /> German <img src="<?php echo bloginfo('template_url').'/images/langs/arrow.png'; ?>" border=0 align="right" style="margin-left:10px;"/> </span></a></dt>
				<?php }elseif($_SESSION['lang']=="spanish"){ ?><dt><a href="#" title="spanish"><span><img class="flag" src="<?php echo bloginfo('template_url').'/images/langs/'; ?>es.png" alt="spanish" /> Spanish <img src="<?php echo bloginfo('template_url').'/images/langs/arrow.png'; ?>" border=0 align="right" style="margin-left:10px;"/> </span></a></dt>
				<?php }elseif($_SESSION['lang']=="english"){ ?><dt><a href="#" title="english"><span><img class="flag" src="<?php echo bloginfo('template_url').'/images/langs/'; ?>us.png" alt="english" /> English <img src="<?php echo bloginfo('template_url').'/images/langs/arrow.png'; ?>" border=0 align="right" style="margin-left:10px;"/> </span></a></dt>
				<?php }elseif($_SESSION['lang']=="russian"){ ?><dt><a href="#" title="russian"><span><img class="flag" src="<?php echo bloginfo('template_url').'/images/langs/'; ?>ru.png" alt="russian" /> Russian  <img src="<?php echo bloginfo('template_url').'/images/langs/arrow.png'; ?>" border=0 align="right" style="margin-left:10px;"/> </span></a></dt>
				<?php }elseif($_SESSION['lang']=="persian"){ ?><dt><a href="#" title="persian"><span><img class="flag" src="<?php echo bloginfo('template_url').'/images/langs/'; ?>ir.png" alt="persian" /> Persian  <img src="<?php echo bloginfo('template_url').'/images/langs/arrow.png'; ?>" border=0 align="right" style="margin-left:10px;"/> </span></a></dt>
				<?php }elseif($_SESSION['lang']=="portuguese"){ ?><dt><a href="#" title="portuguese"><span><img class="flag" src="<?php echo bloginfo('template_url').'/images/langs/'; ?>pt.png" alt="portuguese" /> Portuguese  <img src="<?php echo bloginfo('template_url').'/images/langs/arrow.png'; ?>" border=0 align="right" style="margin-left:10px;"/> </span></a></dt> 
				<?php }elseif($_SESSION['lang']=="norwegian"){ ?><dt><a href="#" title="norwegian"><span><img class="flag" src="<?php echo bloginfo('template_url').'/images/langs/'; ?>no.png" alt="norwegian" /> Norwegian <img src="<?php echo bloginfo('template_url').'/images/langs/arrow.png'; ?>" border=0 align="right" style="margin-left:10px;"/> </span></a></dt>
				<?php }else{ ?><dt><a href="#" title="english"><span><img class="flag" src="<?php echo bloginfo('template_url').'/images/langs/'; ?>us.png" alt="english" /> English <img src="<?php echo bloginfo('template_url').'/images/langs/arrow.png'; ?>" border=0 align="right" style="margin-left:10px;"/> </span></a></dt><?php } ?>

			<dd>
				<ul  style="z-index: 1;">                
				<li><a href="?l=french" title="french"><img class="flag" src="<?php echo bloginfo('template_url').'/images/langs/'; ?>fr.png" alt="french" /> French </a></li>
				<li><a href="?l=bulgarian" title="bulgarian"><img class="flag" src="<?php echo bloginfo('template_url').'/images/langs/'; ?>bg.png" alt="bulgarian" /> Bulgarian </a></li>
				<li><a href="?l=german" title="german"><img class="flag" src="<?php echo bloginfo('template_url').'/images/langs/'; ?>de.png" alt="german" /> German </a></li>
				<li><a href="?l=spanish" title="spanish"><img class="flag" src="<?php echo bloginfo('template_url').'/images/langs/'; ?>es.png" alt="spanish" /> Spanish </a></li>
				<li><a href="?l=english" title="english"><img class="flag" src="<?php echo bloginfo('template_url').'/images/langs/'; ?>us.png" alt="english" /> English</a></li>
				<li><a href="?l=russian" title="russian"><img class="flag" src="<?php echo bloginfo('template_url').'/images/langs/'; ?>ru.png" alt="russian" /> Russian  </a></li>
				<li><a href="?l=persian" title="persian"><img class="flag" src="<?php echo bloginfo('template_url').'/images/langs/'; ?>ir.png" alt="persian" /> Persian  </a></li>
				<li><a href="?l=portuguese" title="portuguese"><img class="flag" src="<?php echo bloginfo('template_url').'/images/langs/'; ?>pt.png" alt="portuguese" /> Portuguese  </a></li> 
				<li><a href="?l=norwegian" title="norwegian"><img class="flag" src="<?php echo bloginfo('template_url').'/images/langs/'; ?>no.png" alt="norwegian" /> Norwegian </a></li>
			   </ul>

			</dd>
		</dl>

		</td>
		
		<?php } ?>
		</tr>
	</table>
	</div>
	<?php if(get_option("advertising_top_checkbox") =="1"){ ?>
	
	<div style="margin-top:30px; margin-bottom:0px; float:right;margin-right:20px;"><?php echo shopperpress_banner("top"); ?></div>
	
	<?php }elseif($GLOBALS['adminads'] ==1){ 
	
		if(file_exists(FilterPath()."/wp-content/themes/shopperpress/ads/_ad_header.php")){ 
			include(FilterPath()."/wp-content/themes/shopperpress/ads/_ad_header.php");
		}	

	 } ?>

    <div class="grid_12" id="Nav" style="margin-bottom:0px; padding-bottom:0px; z-index: 0;">

 
	<?php 
	/*
	*	info: Display Feedburner Box
	*/
	
	if($GLOBALS['shopperpress']['search_box'] =="yes1"){ ?>
    
	<div style="float:left; width:250px;">
	
	<form method="get" id="NewsLetter" action="<?php bloginfo('url'); ?>/">
	<input type="text" value="<?php echo SPEC($GLOBALS['_LANG']['_keyword']) ?>" name="s" id="s" style="width:130px;float:left; margin-left:10px; margin-top:4px;" onfocus="clearSearch();" />
	<input class="SideBtn" type="image" name="Search" src="<?php bloginfo('template_url'); ?>/themes/<?php echo $GLOBALS['shopperpress']['theme']; ?>/images/SideSearchBtn.gif" style="margin-top:4px; width:75px;"/>
	</form>
    
	</div>
	<?php } ?>


	<ul class="sf-menu"> 
	<li><a href="<?php bloginfo('url'); ?>"><?php echo SPEC($GLOBALS['_LANG']['_home']) ?></a></li>
	<?php if($GLOBALS['shopperpress']['pages'] =="yes"){ wp_list_pages("title_li=&exclude=".$GLOBALS['shopperpress']['excluded_pages'] ); }else{ echo ShopperPress_Navigation(); } ?>
	</ul>
 
 
   </div>

 	<?php 
	
		if($GLOBALS['shopperpress']['subnav'] =="yes" && $GLOBALS['shopperpress']['theme'] !="default"){ 
	
			include("_subnav.php"); 
		
		}else{ 
		
			echo "<br class='Clear' />";
		
		} 
		
	?>

	</div>
 
</div>
<div class="container_12" id="subnav"></div> 
<div class="container_12" id="MainContentArea">

<?php 

// SPACING FOR SUB NAV BAR
if( ( $GLOBALS['shopperpress']['subnav'] =="no" || $GLOBALS['shopperpress']['subnav'] =="" ) && $GLOBALS['shopperpress']['theme'] !="default" && !in_array($GLOBALS['shopperpress']['theme'],$theme_spacing) ){ ?>
<br /><br />
<?php } ?>



<?php

if(is_home()){ 

	if(file_exists(FilterPath()."/wp-content/themes/shopperpress/themes/".$GLOBALS['shopperpress']['theme'].'/_frontpage.php')){
	
		include(FilterPath()."/wp-content/themes/shopperpress/themes/".$GLOBALS['shopperpress']['theme'].'/_frontpage.php');
	
	}
}

?>

<?php

/* HIDELAYOUT IS USED IN SOME TEMPLATES */
if( !isset($GLOBALS['HIDELAYOUT']) ){
?>
<div id="bg"><div id="HoltsBanner"></div></div>
<div class="<?php echo $GLOBALS['SP_LAY_LEFT']; ?> Left" <?php if(is_single() || isset($GLOBALS['IS_SINGLE']) ){ ?>style="display:none;"<?php } ?>>
<div class="menubox_top"> </div>
<div class="menubox_mid">

	<?php 
	/*
	*	info: Display Search Box
	*/
	
	if($GLOBALS['shopperpress']['search_box'] =="yes2"){ ?>
 	<div class="menubox_box">	
	<h2><span><?php echo SPEC($GLOBALS['_LANG']['_searchwebsite']); ?></span></h2><ul><li>
	<form method="get" id="NewsLetter" action="<?php bloginfo('url'); ?>/">
	<input type="text" value="<?php echo SPEC($GLOBALS['_LANG']['_keyword']) ?>" name="s" id="s" style="width:90%;" onfocus="clearSearch();" />
	<input class="SideBtn" type="image" name="Search" src="<?php bloginfo('template_url'); ?>/themes/<?php echo $GLOBALS['shopperpress']['theme']; ?>/images/SideSearchBtn.gif"/>
	</form>
	</li></ul>
	</div>
	<?php } ?>


	<?php 
	/*
	*	info: Display Categories Box
	*/
	
	if($GLOBALS['shopperpress']['categories'] =="yes"){ ?>
	<div class="menubox_box">
	<?php if( $GLOBALS['shopperpress']['display_flymenu'] =="yes"){ ?><h2><span><?php echo SPEC($GLOBALS['_LANG']['_categories']) ?></span></h2><?php } ?>
	<?php if( $GLOBALS['shopperpress']['display_flymenu'] =="yes"){ ?>
	<ul class='sf-menu sf-vertical'><?php echo ShopperPress_Navigation(3); ?></ul>
	<?php }else{ ?>
	<ul><?php echo ShopperPress_Navigation(1); ?></ul>
	<?php } ?>
	</div> <div style="clear:both;"></div><br />
	<?php } ?>

	<?php 
	/*
	*	info: Display Feedburner Box
	*/
	
	if(get_option("feedburner_checkbox") =="1"){ 
	$AWEBERCODE = get_option("aweber_code");
	if(strlen($AWEBERCODE) > 10){
		echo stripslashes($AWEBERCODE);
	}else{ 
 	?>
	<div class="menubox_box">	
	<h2><span><?php echo SPEC($GLOBALS['_LANG']['_newsletter']) ?></span></h2>
	<ul><li>
	<form id="NewsLetter" action="http://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow" onsubmit="window.open('http://feedburner.google.com/fb/a/mailverify?uri=<?php echo get_option("feedburner_url"); ?>', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true">
	<input type="text" style="width:130px; color:#333333" name="name" value="Your Name" onclick="if(this.value=='Your Name') {this.value='';}" />

	<input type="text" style="width:130px; color:#333333" name="email" value="<?php echo SPEC($GLOBALS['_LANG']['_youremailaddress']) ?>" onclick="if(this.value=='Your Email Address') {this.value='';}" />
	<input type="hidden" value="<?php echo get_option("feedburner_url"); ?>" name="uri"/>
	<input type="hidden" name="loc" value="en_US"/>
	<input class="SideBtn" type="image" name="submit" src="<?php bloginfo('template_url'); ?>/themes/<?php echo $GLOBALS['shopperpress']['theme']; ?>/images/SideNewsLetterBtn.gif"/>
	</form>
	</li></ul>
	</div>
	<?php } } ?>


	<?php if ( !function_exists('dynamic_sidebar')
	|| !dynamic_sidebar('Left Sidebar') ) : ?>
	<?php endif; ?>

	<?php if(get_option("advertising_left_checkbox") =="1"){ ?>

	<div style="margin-left:20px;"><?php echo shopperpress_banner("left"); ?></div>

	<?php } ?>

</div><div class="menubox_bot"></div>

</div><!--Left-->


<!-- MAIN SHOPPERPRESS CONTENT -->

<div class="<?php echo $GLOBALS['SP_LAY_CONTENT']; ?>" >


<?php if(function_exists('bcn_display')) { ?><div id="BreadCrumb"><?php echo SPEC($GLOBALS['_LANG']['_youarehere']) ?> <?php  bcn_display();  ?> </div><?php }else{ ?> <?php } ?>


<div class="Content">
 
<?php if(is_home() && get_option("display_featuredbox") =="1"  ){ include(FilterPath()."/wp-content/themes/shopperpress/_featured.php"); } ?> 


<?php } // HIDELAYOUT ?>

<?php } // INCLUDE ?>